The invention relates to digital data processing and, more particularly, to improved methods and apparatus for handling process checkpoints and forks.
When running a program on a computer it is often desirable to take a snapshot, or "checkpoint," of the program. That is, to record values of program variables, counters and system parameters so that the program can later be restarted, just as if it were running from the time of the checkpoint. Such a snapshot can be helpful, for example, in restarting a process that terminates abnormally.
In many conventional computer systems, upon taking a checkpoint the entire process--i.e., the values of all registers and data associated with an executing program--is stored to disk, or other secondary storage device. This can prove costly, both with respect to time and secondary data storage space.
Heretofore unrelated to checkpointing many computer systems, for example, those running under UNIX or UNIX-like operating systems, permit process duplication, or forking. Forking causes one process to replicate, spawning a new process. The first process, referred to as the parent, continues in the normal manner after the fork. The spawned process, or child, though initially identical to the parent, can be executed in a different manner.
In creating a child process, a conventional computer system copies the entire memory space of the parent into that of the child. Where the parent's process space is large, this can prove costly from a memory allocation standpoint.
In view of the foregoing, an object of the invention is to provide an improved digital data processing system and method.
More particularly, an object of the invention is to provide a digital data processing mechanism which minimizes the cost associated with checkpointing and forking.
Another object of the invention is to provide a method and apparatus for creating forks and checkpoints which best utilizes system resources.
Still another object is to provide improved mechanisms for forking and checkpointing useful within computer systems running UNIX or UNIX-like operating systems.